<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>驱动器</title>
	<link rel="stylesheet" href="{{ url_for('static', filename='layui/css/layui.css') }}">
	<script src="{{ url_for('static', filename='layui/layui.js') }}"></script>
	<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">
</head>
<body>
	<div class="layui-container">
		<div class="title-c">驱动器</div>
		<div class="layui-row">
			{% for driver in drivers %}
			<div class="layui-col-md2 file-box">
				<i class="layui-icon layui-icon-cellphone"></i>
				<p>{{ driver}}</p>
			</div>
			{% endfor %}
		</div>


	</div>

	<script>
		layui.use('layer', function(){
			var layer = layui.layer;
            var $ = layui.$;

			// layer.msg('Hello World');
			$('.file-box').click(function () {
				var driver = $(this).text();
                // 打开新页面访问/files路由显示driver内容
				window.open('/files?dir='+driver);

				// 弹窗显示driver
				// layer.open({
				// 	type: 1,
				// 	title: 'driver',
				// 	content: driver,
				// 	area: ['300px', '200px'],
				// 	btn: ['确定', '取消'],
				// 	yes: function(index, layero){
				// 		//do something
				// 		layer.close(index); //如果设定了yes回调，需进行手工关闭
				// 	}
				// });
			});
		});
	</script>

</body>
</html>